/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package session05;

/**
 *
 * @author macbookpro
 */
public class SinhVien<T extends Comparable> implements Comparable<SinhVien<String>> {
    private T rollNo;
    private String name;

    public SinhVien() {
    }

    public SinhVien(String name) {
        this.name = name;
    }

    public SinhVien(T rollNo, String name) {
        this.rollNo = rollNo;
        this.name = name;
    }
    
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public T getRollNo() {
        return rollNo;
    }

    public void setRollNo(T rollNo) {
        this.rollNo = rollNo;
    }
    
    public String toString (){
        return name;
    }

    @Override
    public int compareTo(SinhVien t) {
        return t.name.compareTo(name);
    }
}
